<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-on指令讲解</title>
		<script src="js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<button v-on:click="doit()">点击</button>
			<button @click="doit()">指令简化</button>
			{{msg}}
		
		</div>
	</body>
	<script>
		var app=new Vue({
			el:"#app",
			data:{
				msg:"helloWorld!"
			},
			methods:{
				doit:function(){
					this.msg="v-on点击后更改了msg的值"
				}
			}
		})
				
	</script>
</html>
